-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't close the audio reader which might be linked from a shallow copy. #1059
Conversation
The appveyor build is broken - not just on my branch. I have fixed this in #1067 |
Don't shut down the reader - it could be shared between multiiple clip instances. Just unset it here and the GC should kill it when it's no longer referenced anywhere.
I've confirmed that this fixes #938 which has been a major bug for the past year on both macOS and Windows (and presumably linux). I wanted to properly investigate the handling and closing of external processes in v2.0, but that is likely still some time away so I'd like to release a v1.0.3 with just this PR in. The only catch is that with this PR, Windows often fails with I don't have any time to investigate further anytime soon, so if we don't release this PR, then we'll presumably have to hold off until v2.0. @Zulko (or anyone else) please advise. You can compare the 2 latests commits (ignore their names) to see the difference that this creates. |
Thank you for the contribution! The test in particular was very helpful when trying to diagnose the issue. It has been included in #1185, which has superseded this PR, so I am closing this one. I'd be happy to receive PRs about further improvements to how clips are deleted and closed, but they would have to be fully thought out and work the same with both video and audio. |
This fixes #1025
A recent change closed the audio reader object when the video file reader object was closed. However the former could be shared between the clip being closed and another clip which was still needed, because of shallow copying, I think it's fine to let the garbage collector
del
the reader object when it's definitively no longer needed.(Strikethrough - not applicable or not needed):
I have properly documented new or changed features in the documention, or the docstringsI have properly documented unusual changes to the code in the comments around itI have made note of any breaking/backwards incompatible changes